//
//  CurrentAffairModel.swift
//  koolcar
//
//  Created by kuaimaxiansheng on 2023/9/19.
//

import UIKit
import ObjectMapper

class CurrentAffairModel: Mappable {
    var code : String?
    var data : [CurrentAffairDataModel]?
    var msg : String?
    
    required init?(map: Map) {
        
    }
    
    func mapping(map: Map) {
        code <- map["code"]
        data <- map["data"]
        msg <- map["msg"]
    }
}
class CurrentAffairDataModel: Mappable {
    var id : NSInteger?
    var createdTime : String?
    var modifyTime : String?
    var grade : String?
    var name : String?
    var url : String?
    var treePath : String?
    var showType : String?
    var isBottom : String?
    var urls : String?
    var articleList : [ArticleListModel]?
    var content: [ArticleListModel]?
    
    required init?(map: Map) {
        
    }
    init(){}
    
    func mapping(map: Map) {
        id <- map["id"]
        createdTime <- map["createdTime"]
        modifyTime <- map["modifyTime"]
        grade <- map["grade"]
        name <- map["name"]
        modifyTime <- map["modifyTime"]
        url <- map["url"]
        treePath <- map["treePath"]
        showType <- map["showType"]
        isBottom <- map["isBottom"]
        urls <- map["urls"]
        articleList <- map["articleList"]
        content <- map["content"]
        
    }
}

class ArticleListModel: Mappable {
    var id : NSInteger?
    var createdTime : String?
    var author : String?
    var content : String?
    var title : String?
    var url : String?
    var imageUrl : String?
    var columnName : String?
    var columnImage : String?
    var usedcars : [CarDetailsContentModel]?
    var shareText: String?//分享文本
    var shareUrl: String?//分享url
    
    required init?(map: Map) {
        
    }
    
    func mapping(map: Map) {
        id <- map["id"]
        createdTime <- map["createdTime"]
        author <- map["author"]
        content <- map["content"]
        title <- map["title"]
        url <- map["url"]
        imageUrl <- map["imageUrl"]
        columnName <- map["columnName"]
        columnImage <- map["columnImage"]
        usedcars <- map["usedcars"]
        shareText <- map["shareText"]
        shareUrl <- map["shareUrl"]
    }
}

class CarDetailsContentModel:  Mappable {
    var appearanceImages: String?//外观图多张逗号拼接
    var backgroundImage: String?//车辆背景图片
    var brandId: Int?//车辆品牌ID
    var brandName: String?
    var carNo: String?
    var createdTime: String?
    var delFlag: Int?
    var energy: String?//引擎种类
    var energyEn: String?
    var engine: String?//引擎
    var ownerNum: String?//前任车主数
    var colorname: String?
    var engineChassisImages: String?//底盘图多张逗号拼接
    var engineEn: String?
    var exfactoryDate: String?//出厂日期
    var firstEn: String?
    var gearbox: String?//变速箱
    var gearboxEn: String?
    var id: Int?
    var interiorImages: String?//内饰图多张逗号拼接
    var stereoscopicAppearanceImages: String?
    var isMarketable: Int?//是否上架 1是，0否
    var isReserve: Bool?//是否预售 1是，0否
    var isSell: Bool?//是否售出 1是，0否
    var isTop: Bool?
    var marketable: Int?
    var mileage: Double?//里程
    var mileageEn: Int?
    var modifyTime: String?
    var name: String?//车辆名称
    var nameEn: String?
    var new: Bool?
    var orderPrice: Double?//订购价
    var subscription: Double? //海外车订购价
    var otherParameter: String?
    var otherParameterModel: [OtherinfoModel]?
    var otherParameterJson: [OtherinfoModel]?
    var otherParameterJsonNew: [EntitiesModel]?
    var owner: String?
    var ownerArea: String?
    var storeVal: String?
    var ownerPhone: String?
    var price: Double?//车辆价格
    var remark: String?
    var reportPdf: String?//opo
    var reserve: Bool?
    var seatNum: Int?
    var seatCount: NSInteger?
    var sell: Bool?
    var seriesId: String?//车辆系列ID
    var stereoscopicImage: String?//360图片
    var storeId: Int?//车辆门店ID
    var styleId: Int?//车辆款式ID
    var top: Bool?
    var version: Int?
    var favorite: Bool?//1：收藏,0:未收藏
    var serivceGuaranteeImage: String?//服务保障
    var storeName: String? //店名
    var styleName: String? //车型
    var shareText: String? //分享文本
    var steeringWheel: NSInteger?//0左侧。1:右侧
    var logo: String?//品牌logo
    
    var assurance: String?//服务保障
    var videoUrl: String?//视频
    var carFacilityDetail: String?//车厢设备
    var carRelationList: [VehicleLisetModel]?
    var originalPrice: Double?
    var isSpecial: Bool?
    
    var optionalEquipments: [OptCommonModel]?
    var additionalOptionalEquipments: [OptCommonModel]?
    var webOptionalEquipments: [OptCommonModel]?
    var wayName = ""//方式
    var selectType = 0//
    var firstAmount: Double?//首期金额
    var monthlyAmount: Double?//月供金额
    var interestRate = 3.75//利率
    var deadlines = 36//期数
    var reminder = ""
    var installment = ""//供款
    var videoVrPdfList :[VideoVRPdfModel]?//视频、vr、OBD报告
    
    func mapping(map: Map) {
        stereoscopicAppearanceImages <- map["stereoscopicAppearanceImages"]
        webOptionalEquipments <- map["webOptionalEquipments"]
        additionalOptionalEquipments <- map["additionalOptionalEquipments"]
        optionalEquipments <- map["optionalEquipments"]
        
        colorname <- map["colorname"]
        subscription <- map["subscription"]
        seatCount <- map["seatCount"]
        storeVal <- map["storeVal"]
        appearanceImages <- map["appearanceImages"]
        backgroundImage <- map["backgroundImage"]
        carNo <- map["carNo"]
        createdTime <- map["createdTime"]
        delFlag <- map["delFlag"]
        energy <- map["energy"]
        energyEn <- map["energyEn"]
        engine <- map["engine"]
        engineChassisImages <- map["engineChassisImages"]
        engineEn <- map["engineEn"]
        exfactoryDate <- map["exfactoryDate"]
        firstEn <- map["firstEn"]
        gearbox <- map["gearbox"]
        gearboxEn <- map["gearboxEn"]
        id <- map["id"]
        interiorImages <- map["interiorImages"]
        isMarketable <- map["isMarketable"]
        isReserve <- map["isReserve"]
        isSell <- map["isSell"]
        isTop <- map["isTop"]
        marketable <- map["marketable"]
        mileage <- map["mileage"]
        mileageEn <- map["mileageEn"]
        modifyTime <- map["modifyTime"]
        name <- map["name"]
        nameEn <- map["nameEn"]
        new <- map["new"]
        orderPrice <- map["orderPrice"]
        otherParameter <- map["otherParameter"]
        owner <- map["owner"]
        ownerArea <- map["ownerArea"]
        ownerPhone <- map["ownerPhone"]
        price <- map["price"]
        remark <- map["remark"]
        reportPdf <- map["reportPdf"]
        reserve <- map["reserve"]
        seatNum <- map["seatNum"]
        sell <- map["sell"]
        seriesId <- map["seriesId"]
        stereoscopicImage <- map["stereoscopicImage"]
        storeId <- map["storeId"]
        styleId <- map["styleId"]
        top <- map["top"]
        version <- map["version"]
        favorite <- map["favorite"]
        serivceGuaranteeImage <- map["serivceGuaranteeImage"]
        otherParameterJson <- map["otherParameterJson"]
        storeName <- map["storeName"]
        otherParameterJsonNew <- map["otherParameterJsonNew"]
        styleName <- map["styleName"]
        shareText <- map["shareText"]
        assurance <- map["assurance"]
        videoUrl <- map["videoUrl"]
        carFacilityDetail <- map["carFacilityDetail"]
        carRelationList <- map["carRelationList"]
        ownerNum <- map["ownerNum"]
        brandName <- map["brandName"]
        originalPrice <- map["originalPrice"]
        isSpecial <- map["isSpecial"]
        steeringWheel <- map["steeringWheel"]
        logo <- map["logo"]
        
    }
    required init?(map: Map) {
        
    }
    init() {
        
    }
    
}

class OptCommonModel: Mappable{
    var equipmentName : String?
    var isHas : String?
    required init?(map: Map) {
        
    }
    
    func mapping(map: Map) {
        equipmentName <- map["equipmentName"]
        isHas <- map["isHas"]
    }
    init() {
        
    }
}

class VideoVRPdfModel: Mappable {
    var content : String?
    var content1 : String?
    var content2 : String?
    var name: String?
    var type: NSInteger?//0:视频、1:vr、2:pdf
    var image: String?
    required init?(map: Map) {
        
    }
    
    func mapping(map: Map) {
        
        
    }
    init() {
        
    }
    
}
